package com.emep.emeptime.service;


import com.emep.emeptime.entity.AqiControlInfo;
import com.emep.emeptime.repository.AQIControlInfoRepository;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
/**
 * @author wangcc
 * @Description: aqi管控表业务层
 * @date 2018/3/279:03
 * @version V1.0
 */
@Service
@Slf4j
public class AQIControlInfoService {

    @Resource
    private AQIControlInfoRepository aqiControlInfoRepository;

    /**
     *
     * 新增排名数据
     *
     * @param payload
     * @return
     * @throws Exception
     */
    public AqiControlInfo save(AqiControlInfo payload) {
        AqiControlInfo SysAqiInfo = null;
        try {
            SysAqiInfo = aqiControlInfoRepository.save( payload );
        }catch (Exception e){
            log.error(e.getClass().getName()+":"+ e.getMessage());
            log.error(e.getLocalizedMessage());
        }
        return SysAqiInfo;
    }
}
